Mathematical calculation method for an image capturing device

ABSTRACT

A mathematical calculation method for an image-capturing device includes steps: estimating a green value of a red, blue pixel; calculating four differences between an estimated red value and four neighboring green pixels, weighing proportions of the four neighboring green pixels, and summing up the differences between the four products induced by multiplying the four differences and the four proportions respectively, as a green value G 3 ′ in the red pixel. A green value of a blue pixel will be obtained by mentioned steps. A blue value of the red pixel occurs when the following steps: figuring out differences between four green values and four blue values of four neighboring blue pixels, averaging the four differences, and subtracting the average of the four differences from the green value of the red pixel. A red value of the blue pixel and a red, blue value of the green pixel can be estimated, too.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a mathematical calculation method foran image-capturing device, and particularly relates to a mathematicalcalculation method for an image-capturing device, adapted for modelingdigital images.

2. Background of the Invention

In the digital age, relevant hardware and software technology is growingand developing at a rapid rate and digital image-capturing devices areused more and more regularly in people's everyday lives, such as fordigital cameras, digital video or digital products of the like.

Besides the image capturing sensors, such as a charge coupled device(CCD) or a complementary metal-oxide semiconductor (CMOS), the imagequality of the digital image-capturing devices depends on the imageprocessing chips.

The image-capturing sensor captures image signals of pixels via matrixphotocells. Each photocell does not catch the three primary colors (R,G, B), but catches a single, specific color in each pixel. For example,a red filter arranged in a photocell captures a red image signal, sothat each photocell has only a single image signal. The most commonlyused pattern of an individual photocell on the image-capturing sensorhas a red-green-red-green (RGRG) sequence in the first row andgreen-blue-green-blue (GBGB) sequence in the second row, for avertical-and-horizontal alternately arrangement, illustrated in FIG. 1.

In the alternate arrangement of the three color photocells, the greencolor photocells are mainly processed and arranged separately by blueand red color photocells, and the image process chip calculates adigital color image for stimulating the other two colors in each pixel.For example, for resetting a green value G3′ and a blue value B3′ in ared pixel R3, the upside, the downside, the left side and the right sideare arranged with green pixels (G6, G7, G8, G9); and the upper-leftside, the lower-left side, the upper-right side and the lower-right sideare arranged with blue pixels (B18, B19, B20, B21). Therefore, anaverage green value, which is obtained by estimating from the adjacentgreen pixels (G6, G7, G8, G9) surrounding the red pixel, and an averageblue value, which is obtained by estimating from the adjacent bluepixels (B18, B19, B20, B21) surrounding the red pixel, are the greenvalue G3′ and the blue value B3′ matching the red pixel.

According to the conventional method of calculating a digital image, thequantity of photocells can be reduced, the volume of the image-capturingdevices can be shrunk, so that costs can be lowered. However, due to theestimating of color values, weird points may occur on the edge of theimage contour, particularly when a large color contrast occurs, thesharp teeth edge of the image contour or the vague image may come about.This kind of shortcoming cannot be overcome if the conventional methodof the mathematical calculation is used. Thus, a new method ofmathematical calculation will be provided to overcome the shortcomingsmentioned above and further increase the processing speed of animage-processing chip.

SUMMARY OF THE INVENTION

The primary objectives of the invention are therefore to specify amathematical calculation method for an image-capturing device, in orderto estimate the two missing color values for a one-color pixel easily,rapidly and, accurately, and to reduce the wrong color values foravoiding vague images, and to provide a mathematical calculation methodthat can be applied with simple operation.

According to the invention, the objectives are achieved by providing amathematical calculation method for an image-capturing device, adaptedfor an image-capturing sensor capturing an image signal, wherein theimage-capturing sensor includes a plurality of photocells for obtainingthree primary colors (red, blue, green). Each photocell catches onecolor and estimates the other two color values as a pixel. Themathematical calculation method includes the following steps:

defining two green pixels adjacent to a red pixel R3 above or beneathvertically as G6 and G9, and two green pixels adjacent to the red pixelR3 on the left side or right side horizontally as G7 and G8,respectively;

defining two red pixels spaced one pixel's distance from the red pixelR3 above or beneath vertically as R1 and R5, and two red pixels spacedone pixel's distance from the red pixel R3 on the left side or rightside horizontally as R2 and R4, respectively;

obtaining four differences (k1˜k4) by subtracting an average value ofthe two relative red pixels, which are adjacent to a respective one ofthe mentioned four green pixels (G6˜G9), from the respective greenpixel;

calculating four weighting values (k5˜k6) from the four differences(k1˜k4);

summarizing the value of the red pixel R3 and the four products, whichis induced by multiplying the four differences (k1˜k4) and the fourweighting values (k5˜k6) respectively, as a green value G3′ in the redpixel;

defining four blue pixels adjacent to the upper-left side the,lower-left side, the upper-right side and the lower-right side of thered pixel R3 as B18, B19, B20 and B21, respectively;

repeating the mentioned steps, in order to get four green values in theother four red pixels and four green values (G18′˜G21′) in the four bluepixels (B18˜B21), respectively;

obtaining four differences (k11˜k14) by subtracting four blue pixels(B18˜B21) from the four green values (G18′˜G21′);

obtaining a blue value B3′ in the red pixel R3 by subtracting an averagevalue of the four differences (k11˜k14) from the green value G3′;

repeating the mentioned steps, in order to get four blue values (B1′,B2′, B4′ and B5′) in the other four red pixels, respectively;

repeating the mentioned steps, in order to get four red values (R18′,R19′, R20′ and R21′) in the four blue pixels, respectively; and

obtaining four red values (R6′˜R9′) and four blue value (B6′˜B9′) in arespective one (G6) of the four green pixels (G6˜G9) by calculating thered difference (G1′−R1, G3′−R3) and the blue difference (G18′−B18,G19′−B19).

Particularly, according to the present invention, the equationscorresponding to the four differences (k1˜k4) include:k1=G6−((R1+R3)/2);k3=G9−((R5+R3)/2);k2=G7−((R2+R3)/2); andk4=G8−((R4+R3)/2).

Particularly, according to the present invention, the equationscorresponding to the four weighting values (k5˜k6) include:k5=1/(1+|k1|);k6=1/(1+|k2|);k7=1/(1+|k3|); andk8=1/(1+|k4|).

Particularly, according to the present invention, to figure out theproportions of the four weighting values (k5˜k6) to a total weightingvalue (k9) individually, and equations corresponding to the fourweighting values (k5˜k6) including:k5=k5/k9;k6=k6/k9;k7=k7/k9; andk8=k8/k9.

Particularly, according to the present invention, the equationcorresponding to the green value G3′ of the red pixel includes:G3′=R3+(k5*k1)+(k6*k2)+(k7*k3)+(k8*k4).

Particularly, according to the present invention, the equationscorresponding to the four differences (k11˜k14), and the green value G3′of the red pixel include:k11=G18′−B18;k12=G19′−B19;k13=G20′−B20;k14=G21′−B21, andB3′=G3′−((k11+k12+k13+k14)/2²).

To provide a further understanding of the invention, the followingdetailed description illustrates embodiments and examples of theinvention. Examples of the more important features of the invention thushave been summarized rather broadly in order that the detaileddescription thereof that follows may be better understood, and in orderthat the contributions to the art may be appreciated. There are, ofcourse, additional features of the invention that will be describedhereinafter and which will form the subject of the claims appendedhereto.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features, aspects, and advantages of the presentinvention will become better understood with regard to the followingdescription, appended claims, and accompanying drawings, where:

FIG. 1 is a perspective view of an image array according to animage-capturing device of the present invention;

FIG. 2 is a flow chart according to the present invention;

FIG. 3 is a perspective view of a mode for estimating a green value of ared pixel according to the present invention;

FIG. 4 is a perspective view of a mode for estimating a blue value ofthe red pixel according to the present invention; and

FIG. 5 is a perspective view for sorting part of the weighing valuesaccording to the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

With respect to FIG. 1, a mathematical calculation method of animage-capturing device, adapted for an image-capturing sensor capturingan image signal, wherein the image-capturing sensor includes a pluralityof photocells for obtaining three primary colors (red, blue, green),each photocell catches one color and further estimates the other twocolor values as three colors of each pixel, and the mathematicalcalculation method is used to estimate the missing color values of eachpixel.

The flow chart of a 5-5 array of the photocells is described in FIG. 2;first, a green value of each red pixel is estimated (S500), and thegreen value of the red pixel is calculated by weighing the neighboringgreen values. Second, a green value of each blue pixel is estimated(S501) by weighing the neighbor green pixels. Third, a blue value of thered pixel or a red value of the blue pixel is figured out (S502) byweighting a quarter of the neighboring (upper-left, upper-right,lower-left and lower-right) blue (red) pixels around the red (blue)pixels. Fourth, red and blue values of each green pixel are calculated(S503) by weighting half of the estimated green and blue (red) values.

A mode for estimating the green value G3′ of any red pixel R3 accordingto the present invention is illustrated in FIG. 3. Firstly defining twogreen pixels (101, 102) adjacent to the red pixel R3 (100) above orbeneath vertically as G6 and G9, and two green pixels (103, 104)adjacent to the red pixel R3 left side or right side horizontally as G7and G8, respectively. Next two red pixels (105, 106) are defined andspaced one-pixel's distance from the red pixel R3 (100) above or beneathvertically as R1 and R5, and two red pixels (107, 108) spacedone-pixel's distance from the red pixel R3 (100) on the left side or theright side horizontally as R2 and R4, respectively.

Four differences k1˜k4 are then obtained by subtracting an average valueof the two relative red pixels, which are adjacent to a respective oneof the mentioned four green pixels G6˜G9 (101˜104), from the respectivegreen pixel; and the equations corresponding to the four differencesk1˜k4 include:k1=G6−((R1+R3)/2);k3=G9−((R5+R3)/2);k2=G7−((R2+R3)/2); andk4=G8−((R4+R3)/2).

Next, to calculate four weighing values k5˜k6 from the four differencesk1˜k4; and the equations corresponding to the four weighing values k5˜k6include:k5=1/(1+|k1|);k6=1/(1+|k2|);k7=1/(1+|k3|);k8=1/(1+|k4|); andk9=k5+k6+k7+k8.

Then, to calculate the weighing values (k5, k6, k7 and k8) proportion tothe total weighing value k9 in order to replace the weighing values (k5,k6, k7 and k8), and the equations corresponding to the four weighingvalues k5˜k6 includes:k5=k5/k9;k6=k6/k9;k7=k7/k9; andk8=k8/k9.

Finally, surmising the value of the red pixel R3100 and the fourproducts, which are induced by multiplying the four differences k1˜k4and the four weighing values k5˜k6 respectively, as the green value G3′in the red pixel, and the equations corresponding to the green value G3′include:G3′=R3+(k5*k1)+(k6*k2)+(k7*k3)+(k8*k4).

Similar to the previously mentioned steps, the green values G1′, G2′,G4′ and G5′ of the other red pixels R1, R2, R4 and R5 (105, 107, 106,and 108) and the green values G18′, G19′, G20′ and G21′ of the bluepixels B18, B19, B20 and B21 (201, 202, 203, and 204) are reset.

After the green value G3′ of the red pixel R3 (100) is done, the bluevalue B3′ of the red pixel R3 (100) is processed in FIG. 4. Definingfour blue pixels (201, 203, 202, 204) adjacent to the upper-left sidethe, the upper-right side, the lower-left side and the lower-right sideof the red pixel R3 (100) as B18, B20, B19 and B21, respectively,obtains four green values G18′˜G21′ in the four blue pixels (B18˜B21),respectively.

Next, obtaining four differences k11˜k14 by subtracting four blue pixelsB18˜B21 from the four green values G18′˜G21′; and the equationscorresponding to the four differences k11˜k14 include:k11=G18′−B18;k12=G19′−B19;k13=G20′−B20; andk14=G21′−B21.

Finally, the blue value B3′ in the red pixel R3 is obtained bysubtracting an average value of the four differences k11˜k14 from thegreen value G3′; the equations corresponding to the blue value B3′include:B3′=G3′−((k11+k12+k13+k14)/2²).

Similar to the above-mentioned steps, the four blue values B1′, B2′, B4′and B5′ (105, 107, 106 and 108) in the other four red pixels R1, R2, R3and R4, and the red value R18′, R19′, R20′ and R21′ of the blue pixelsB18, B19, B20 and B21 (201, 202, 203 and 204) are obtained.

Therefore, the four red values R6′˜R9′ and four blue values B6′˜B9′ inthe four green pixels G6˜G9 (101˜104) are obtained by calculating thered difference (G1′−R1, G3′−R3) and the blue difference (G18′−B18,G19′−B19), and the equations corresponding to the red value R6′ and theblue value B6′ of the four green pixels G6˜G9 (101˜104) include:k15=G1′−R1;k16=G3′−R3;k17=G18′−B18;k18=G19′−B19;R6′=G6−((k15+k16)/2); andB6′=G6−((k17+k18)/2).

Thus, the missing color values in each photocell can be easily set. Ifthe blue value B3′ is more or less than the upper or lower limit valueof the hardware in practice, the blue value B3′ equals the upper orlower limit value. For example of a 2⁸ digital hardware, the upper limitvalue is 255 and the lower limit value 0, so that the blue value B3′ ofthe red pixel R3 (100) is equal to 255 if the blue value B3′ is morethan 255, or the blue value B3′ of the red pixel R3 (100) is equal to 0if the blue value B3′ is less than 0.

The blue value B6′ and the red value R6′ of the green pixel G6 (101)also possibly exceed the upper and the lower values, so that the bluevalue B6′ of the green pixel G6 (101) is equal to 255 if the blue valueB6′ is more than 255, or the blue value B6′ of the green pixel G6 (101)is equal to 0 if the blue value B6′ is less than 0; and the red valueR6′ of the green pixel G6 (101) is equal to 255 if the red value R6′ ismore than 255, or the red value R6′ of the green pixel G6 (101) is equalto 0 if the red value R6′ is less than 0.

The calculation methods of the four differences k1˜k4 and the fourweighing values k5˜k8 are the key points according to the presentinvention because the green pixel is an important color for thedefinition of colored images. Because the four weighing values k5˜k8 areprocessed by the division operation, one approach is provided to get thefour weighing values with simple hardware according to the presentinvention. Thus, the four absolute values of the four differences k1˜k4are sorted first, and a respective maximum value is obtained and aproportion of the maximum value to the sum of the four absolute values,and rearranging four weighing values k5˜k8 corresponding to theproportion. The equations corresponding to the four weighing valuesk5˜k8 include:k5=|k1|;k6=|k2|;k7=|k3|;k8=|k4|; and

ranking the four weighing values (k5˜k8), so as to enable k5≦k6≦k7≦k8.

The regular corresponding to the ranking step include:

if k5>k6, then k99=k6, k6=k5, k5=k99, k99=k2, k2=k1, k1=k99;

if k6>k7, then k99=k7, k7=k6, k6=k99, k99=k3, k3=k2, k2=k99;

if k7>k8, then k99=k8, k8=k7, k7=k99, k99=k4, k4=k3, k3=k99;

if k5>k6, then k99=k6, k6=k5, k5=k99, k99=k2, k2=k1, k1=k99;

if k6>k7, then k99=k7, k7=k6, k6=k99, k99=k3, k3=k2, k2=k99;

if k5>k6, then k99=k6, k6=k5, k5=k99, k99=k2, k2=k1, k1=k99.

For the proportions of the new four weighing values in FIG. 5, theequations of the green value G3′ arek99=k5+k6+k7+k8;k98=k99/2;k97=k99/4;k96=k99/8;

k99, k98, k97 and k96 represent the summarization, the half, the quarterand one-eighth of k5˜k8, respectively.

If k8>(k99−k96), which is located in an area (1) illustrated in FIG. 5,the proportion of k1 is (2⁵−2²), the proportion of k2 is 2, theproportions of k3 and k4 are 1, thenk95=(k1*(2⁵−2²))+(k2*2)+k3+k4;

else if k8>(k99−k97), which is located in area (2), thenk95=(k1*(2⁵−2³))+(k2*2²)+(k3*2)+(k4*2);

else if k8>(k99−k97−k96), which is located in area (3), thenk95=(k1*(2⁵−2³−22))+(k2*23)+(k3*2)+(k4*2);

else if k8>(k99−k98), which is located in area (4), thenk95=(k1*2⁴)+(k2*2³)+(k3*2²)+(k4*2²);

else if k8>(k98−k96), which is located in area (5), thenk95=(k1*(2⁴−2²))+(k2*(2⁴−2²))+(k3*2²)+(k4*2²);

or else (when the equations mentioned above are not exited), which islocated in area (6) or another area, thenk95=(k1*2³)+(k2*2³)+(k3*2³)+(k4*2³), thus

G3′, which is equal to R3+(k95/2⁵), is accurately obtained.

In conventional digital processes, the division operation is highlycomplicated; so much so that costs cannot be decrease. A simpleprinciple for shifting one bit to the right is equal to the divisionoperation of dividing by 2. A simple multiplication circuit for shiftingone bit to the left is equal to the division operation of multiplying by2. Therefore, multiplying by 2 means one-bit shift to the left indigital processing, so that multiplying 2² means a two-bit shift to theleft, multiplying by 2³ means a three-bit shift to the left, multiplyingby 2⁴ means a four-bit shift to the left, multiplying by 2⁵ means afive-bit shift to the left, and dividing by 2⁵ means a five-bit shift tothe right. In accordance with these concepts, the operating speedaccording to the present invention can be increased and the image colorwill be become clearer.

It should be apparent to those skilled in the art that the abovedescription is only illustrative of specific embodiments and examples ofthe invention. The invention should therefore cover variousmodifications and variations made to the herein-described structure andoperations of the invention, provided they fall within the scope of theinvention as defined in the following appended claims.

1. A mathematical calculation method for an image-capturing device,adapted for an image-capturing sensor capturing an image signal, whereinthe image-capturing sensor includes a plurality of photocells forobtaining three primary colors (red, blue, green), each photocellcatches one color and further estimates the other two color values asthree colors of each pixel, and the mathematical calculation methodcomprising of the following steps: defining two green pixels adjacent toa red pixel R3 above or beneath vertically as G6 and G9, and two greenpixels adjacent to the red pixel R3 to a left side or to a right sidehorizontally as G7 and G8, respectively; defining two red pixels spacedone-pixel's distance from the red pixel R3 above or beneath verticallyas R1 and R5, and two red pixels spaced one-pixel's distance from thered pixel R3's left side or right side horizontally as R2 and R4,respectively; obtaining four differences (k1˜k4) by subtracting anaverage value of the two relative red pixels, which is adjacent to arespective one of the mentioned four green pixels (G6˜G9), from therespective green pixel; calculating four weighing values (k5˜k8) fromthe four differences (k1˜k4); summarizing the value of the red pixel R3and the four products which is induced by multiplying the fourdifferences (k1˜k4) and the four weighing values (k5˜k8) respectively,as a green value G3′ in the red pixel; defining four blue pixelsadjacent to the upper-left side the, lower-left side, the upper-rightside and the lower-right side of the red pixel R3 as B18, B19, B20 andB21, respectively; repeating the mentioned steps, in order to get fourgreen values in the other four red pixels and four green values(G18′˜G21′) in the four blue pixels (B18˜B21), respectively; obtainingfour differences (k11˜k14) by subtracting four blue pixels (B18˜B21)from the four green values (G18′˜G21′); obtaining a blue value B3′ inthe red pixel R3 by subtracting an average value of the four differences(k11˜k14) from the green value G3′; repeating the mentioned steps, inorder to get four blue values (B1′, B2′, B4′ and B5′) in the other fourred pixels, respectively; repeating the mentioned steps, in order to getfour red values (R18′, R19′, R20′ and R21′) in the four blue pixels,respectively; and obtaining four red values (R6′˜R9′) and four bluevalues (B6′˜B9′) in a respective one (G6) of the four green pixels(G6˜G9) by calculating the red difference (G1′˜R1, G3′˜R3) and the bluedifference (G18′˜B18, G19′−B19).
 2. The mathematical calculation methodas claimed in claim 1, wherein equations corresponding to the fourdifferences (k1˜k4) include:k1=G6−((R1+R3)/2);k3=G9−((R5+R3)/2);k2=G7−((R2+R3)/2); andk4=G8−((R4+R3)/2).
 3. The mathematical calculation method as claimed inclaim 2, wherein the four differences (k1˜k4) are obtained by shiftingfour formulas ((R1+R3), (R5+R3), (R2+R3) and (R4+/R3)) one bit to theright individually in digital processing.
 4. The mathematicalcalculation method as claimed in claim 1, wherein the equationscorresponding to the four weighing values (k5˜k8) include:k5=1/(1+|k1|);k6=1/(1+|k2|);k7=1/(1+|k3|); andk8=1/(1+|k4|).
 5. The mathematical calculation method as claimed inclaim 1, further including the steps: resorting the four weighing values(k5˜k8) in the step for calculating the four weighing values (k5˜k8),and equations corresponding to the four weighing values (k5˜k8)including:k5=|k1|;k6=|k2|;k7=|k3|;k8=|k4|; and ranking the four weighing values (k5˜k8), so as to enablek5≦k6≦k7≦k8.
 6. The mathematical calculation method as claimed in claim5, further including steps: rearranging the proportion of the fourweighing values (k5˜k8) to obtain the green value G3′ after the step ofresorting the four weighing values (k5˜k8), and equations correspondingto the four weighing values (k5˜k8) including:k99=k5+k6+k7+k8;k98=k99/2;k97=k99/4;k 96= k99/8; if k8>(k99−k96), thenk95=(k1*(2⁵−2²))+(k2*2)+k3+k4; else if k8>(k99−k97), thenk95=(k1*(2⁵−2³))+(k2*2²)+(k 3*2)+( k4*2); else if k8>(k99−k97−k96), thenk95=(k1*(2⁵−2³−22))+(k2*23)+(k3*2)+(k4*2); else if k8>(k99−k98), thenk95=(k1*2⁴)+(k2*2³)+(k3*2²)+(k4*2²); else if k8>(k98−k96), thenk95=(k1*(2⁴−2²))+(k2*(2⁴−2²))+(k3*2²)+(k4*2²); or elsek95=(k1*2³)+(k2*2³)+(k3*2³)+(k4*2³),G3′=R3+(k95/2⁵).
 7. The mathematical calculation method as claimed inclaim 6, wherein multiplying by 2 means a one-bit shift to the left indigital processing, so that multiplying by 2² means a two-bit shift tothe left, multiplying by 2³ means a three-bit shift to the left,multiplying by 2⁴ means a four-bit shift to the left, multiplying by 2⁵means a five-bit shift to the left, and dividing by 2⁵ means a five-bitshift to the right.
 8. The mathematical calculation method as claimed inclaim 1, further including the steps: figuring out the proportions ofthe four weighing values (k5˜k8) to a total weighting value (k9)individually in the step of calculating the four weighing values(k5˜k8), and equations corresponding to the four weighing values (k5˜k8)including:k9=k5+k6+k7+k8;k5=k5/k9;k6=k6/k9;k7=k7/k9; andk8=k8/k9.
 9. The mathematical calculation method as claimed in claim 1,wherein an equation corresponding to the green value G3′ of the redpixel includes:G3′=R3+(k5*k1)+(k6*k2)+(k7*k3)+(k8*k4).
 10. The mathematical calculationmethod as claimed in claim 1, wherein equations corresponding to thefour differences (k1˜k14) include:k11=G18′−B18;k12=G19′−B19;k13=G20′−B20; andk14=G21′−B21.
 11. The mathematical calculation method as claimed inclaim 1 wherein an equation corresponding to the blue value B3′ of thered pixel includes:B3′=G3′−((k11+k12+k13+k14)/2²).
 12. The mathematical calculation methodas claimed in claim 11, wherein dividing by 2² means a two-bit shift tothe right in the B3′ equation.
 13. The mathematical calculation methodas claimed in claim 1, wherein equations corresponding to the red valueR6′ and the blue value B6′ of the green pixel G6 include:k15=G1′−R1;k16=G3′−R3;k17=G18′−B18;k18=G19′−B19;R6′=G6−((k15+k16)/2); andB6′=G6−((k17+k18)/2).
 14. The mathematical calculation method as claimedin claim 13, wherein dividing by 2 means a two-bit shift to the right inthe R6′ and B6′ equations.
 15. The mathematical calculation method asclaimed in claim 1, wherein the blue value B3′ equals an upper limitvalue in the step of obtaining the blue value B3′ of the red pixel R3,if the blue value B3′ is more than the upper limit value; and the bluevalue B3′ equals a lower limit value if the blue value B3′ is less thanthe lower limit value.
 16. The mathematical calculation method asclaimed in claim 15, wherein the upper limit value is 255, the lowerlimit value is
 0. 17. The mathematical calculation method as claimed inclaim 1, wherein the red value R6′ or the blue value B6′ equals an upperlimit value in the step of obtaining the red value R6′ and blue valueB6′ of the green pixel G6, if the red value R6′ or the blue value B6′ ismore than the upper limit value; and the red value R6′ or the blue valueB6′ equals a lower limit value if the red value R6′ or the blue valueB6′ is less than the lower limit value.
 18. The mathematical calculationmethod as claimed in claim 17, wherein the upper limit value is 255 andthe lower limit value is 0.